import 'package:flutter/material.dart';
import 'package:flutter_syt/generated/assets.dart';
import 'package:flutter_syt/generated/l10n.dart';
import 'package:flutter_syt/widgets/auto_image.dart';

class LoadingWidget extends StatelessWidget {
  const LoadingWidget({super.key, this.color});

  final Color? color;

  @override
  Widget build(BuildContext context) {
    return Center(
        // mainAxisAlignment: MainAxisAlignment.center,
        child: Container(
            width: 100,
            height: 100,
            decoration: BoxDecoration(
              color: color ?? Colors.white,
              borderRadius: const BorderRadius.all(Radius.circular(8)),
            ),
            child: Column(
              mainAxisAlignment: MainAxisAlignment.center,
              children: [
                const AutoImage(
                  Assets.loading,
                  width: 64,
                  height: 64,
                ),
                Container(
                  height: 12,
                ),
                Text(
                  S.of(context).loading,
                  style: const TextStyle(color: Colors.black, fontSize: 16),
                ),
              ],
            )
            // Theme(
            //   data: ThemeData(
            //       cupertinoOverrideTheme: CupertinoThemeData(
            //     brightness: Brightness.dark,
            //   )),
            //   child: CupertinoActivityIndicator(
            //     radius: 14,
            //   ),
            // ),

            ));
  }
}
